]> git.r.bdr.sh - rbdr/super-polarity/blobdiff - Super Polarity/ActorFactory.cs
I have the worst commits ever.
[rbdr/super-polarity] / Super Polarity / ActorFactory.cs
index 3e2f80bb1cdced76b049df22a2108044d85eb0e7..3a2dbabaa5e3a2840b31975591d2e75afcd8613f 100644 (file)
@@ -10,7 +10,7 @@ namespace SuperPolarity
 {
     static class ActorFactory
     {
-        static internal Game Game;
+        static internal SuperPolarity Game;
 
         static public MainShip CreateMainShip(Vector2 position)
         {
@@ -48,9 +48,22 @@ namespace SuperPolarity
             return ship;
         }
 
-        internal static void SetGame(Game game)
+        internal static void SetGame(SuperPolarity game)
         {
             ActorFactory.Game = game;
         }
+
+        internal static Bullet CreateBullet(Vector2 position, float angle)
+        {
+            Bullet bullet = new Bullet(Game);
+
+            bullet.Initialize(Game.Content.Load<Texture2D>("Graphics\\square"), position);
+
+            bullet.Angle = angle;
+
+            ActorManager.CheckIn(bullet);
+
+            return bullet;
+        }
     }
 }